<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Project/PHP/PHPProject.php to edit this template
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        include('Students.php');
        $students = array();
        echo "Lab 3";

        $first = new Students();
        $first->surname = "Doe";
        $first->first_name = "John";
        $first->add_email('home', 'john@doe.com');
        $first->add_email('work', 'jdoe@mcdonalds.com');
        $first->add_grade(65);
        $first->add_grade(75);
        $first->add_grade(55);
        $students['j123'] = $first;

        $second = new Students();
        $second->surname = "Einstein";
        $second->first_name = "Albert";
        $second->add_email('home', 'albert@braniacs.com');
        $second->add_email('work1', 'a_einstein@bcit.ca');
        $second->add_email('work2', 'albert@physics.mit.edu');
        $second->add_grade(95);
        $second->add_grade(80);
        $second->add_grade(50);
        $students['a456'] = $second;

        $third = new Students();
        $third->surname = "GuanYu";
        $third->first_name = "Lu";
        $third->add_email('home', 'lgy2578541@gmail.com');
        $third->add_email('work1', '123456789@bcit.ca');
        $third->add_email('work2', 'jfregf@physics.mit.edu');
        $third->add_grade(100);
        $third->add_grade(92);
        $third->add_grade(95);
        $students['c123'] = $third;

        $fourth = new Students();
        $fourth->surname = "San";
        $fourth->first_name = "Zhang";
        $fourth->add_email('home', 'safasafadf@braniacs.com');
        $fourth->add_email('work1', '574556dfgdf@bcit.ca');
        $fourth->add_email('work2', 'jff123@physics.mit.edu');
        $fourth->add_grade(95);
        $fourth->add_grade(90);
        $fourth->add_grade(90);
        $students['d123'] = $fourth;

        foreach ($students as $student) {
            echo $student->toString();
        }
        ?>
    </body>
</html>
